// routes/index.js - 主路由配置
const express = require('express');
const router = express.Router();
// 导入swagger路由
const swaggerRouter = require('./swagger');

// 挂载swagger文档路由
router.use('/doc', swaggerRouter);

// 导入子路由
const authRoutes = require('./auth');
const questionRoutes = require('./questions');
const knowledgeTreeRoutes = require('./knowledgeTree');
const questionTypeRoutes = require('./questionTypes');
const questionSourceRoutes = require('./questionSource');

// 挂载路由（已移除重复的/api前缀）
router.use('/auth', authRoutes);
router.use('/questions', questionRoutes);
router.use('/knowledge-tree', knowledgeTreeRoutes);
router.use('/question-types', questionTypeRoutes);
router.use('/question-sources', questionSourceRoutes);

module.exports = router;
